# Copyright (C) 2022 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("//tools/build/rules:vulkan_generator.bzl", "basic_vulkan_generator")

basic_vulkan_generator(
    name = "handle_remapper_src",
    target = "handle_remapper",
)

cc_import(
    name = "handle_remapper_src_hdrs",
    hdrs = glob(
        [":handle_remapper_src"],
        exclude = ["*.cc"],
    ),
)

cc_library(
    name = "handle_remapper",
    srcs = glob(
        [":handle_remapper_src"],
        exclude = [
            "*_test.cc",
            "*.h",
        ],
    ),
    hdrs = glob(
        [":handle_remapper_src"],
        exclude = ["*.cc"],
    ),
    visibility = ["//visibility:public"],
    deps = [
        "handle_remapper_src_hdrs",
        "//replay2/core_utils",
        "//replay2/vulkan_base",
    ],
)

cc_test(
    name = "handle_remapper_tests",
    srcs = [":handle_remapper_src"],
    deps = [
        "//replay2/core_utils",
        "//replay2/vulkan_base",
        "@com_google_googletest//:gtest_main",
    ],
)
